﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract Obracun typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class ObracunDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<ObracunDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.Obracun _currentObracun = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxObracunDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxObracunErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxObracunBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumOd property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumOdDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumDo property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumDoDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the VrstaUplateRSM property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxVrstaUplateRSMDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the RedniBrojUGodini property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxRedniBrojUGodiniDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MinimalniOsobniOdbitak property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMinimalniOsobniOdbitakDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the FondSati property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxFondSatiDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MaksimalniIznosPorezneOlaksice property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IdentifikatorIDObrasca property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIdentifikatorIDObrascaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the BrutoOsnovica property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxBrutoOsnovicaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DoprinosPoDanuBoravkaUInozemstvu property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Status property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxStatusDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DoprinosZdravstveno property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDoprinosZdravstvenoDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DoprinosZaposljavanje property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDoprinosZaposljavanjeDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DoprinosNezgoda property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDoprinosNezgodaDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the RSMVrstaObveznika property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxRSMVrstaObveznikaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumIsplate property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumIsplateDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MIO1aPostotak property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMIO1aPostotakDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MIO1bPostotak property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMIO1bPostotakDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MIO2Postotak property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMIO2PostotakDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the NajvisaMjOsnovica property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNajvisaMjOsnovicaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DoprinosZaposljavanjeSInvaliditetom property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the IznosZdravstvenogZaInozemstvo property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIznosZdravstvenogZaInozemstvoDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Sifarnik> _IdentifikatorIDObrascaList;
		
		/// <summary> 
		/// The list of selectable Sifarnik
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Sifarnik> IdentifikatorIDObrascaList
		{
			get {return this._IdentifikatorIDObrascaList;}
			set 
			{
				this._IdentifikatorIDObrascaList = value;
				this.uxIdentifikatorIDObrascaDataGridViewColumn.DataSource = null;
				this.uxIdentifikatorIDObrascaDataGridViewColumn.DataSource = this._IdentifikatorIDObrascaList;
			}
		}
		
		private bool _allowNewItemInIdentifikatorIDObrascaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Sifarnik
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIdentifikatorIDObrascaList
		{
			get { return _allowNewItemInIdentifikatorIDObrascaList;}
			set
			{
				this._allowNewItemInIdentifikatorIDObrascaList = value;
				this.uxIdentifikatorIDObrascaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Sifarnik> _VrstaUplateRSMList;
		
		/// <summary> 
		/// The list of selectable Sifarnik
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Sifarnik> VrstaUplateRSMList
		{
			get {return this._VrstaUplateRSMList;}
			set 
			{
				this._VrstaUplateRSMList = value;
				this.uxVrstaUplateRSMDataGridViewColumn.DataSource = null;
				this.uxVrstaUplateRSMDataGridViewColumn.DataSource = this._VrstaUplateRSMList;
			}
		}
		
		private bool _allowNewItemInVrstaUplateRSMList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Sifarnik
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInVrstaUplateRSMList
		{
			get { return _allowNewItemInVrstaUplateRSMList;}
			set
			{
				this._allowNewItemInVrstaUplateRSMList = value;
				this.uxVrstaUplateRSMDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Sifarnik> _RSMVrstaObveznikaList;
		
		/// <summary> 
		/// The list of selectable Sifarnik
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Sifarnik> RSMVrstaObveznikaList
		{
			get {return this._RSMVrstaObveznikaList;}
			set 
			{
				this._RSMVrstaObveznikaList = value;
				this.uxRSMVrstaObveznikaDataGridViewColumn.DataSource = null;
				this.uxRSMVrstaObveznikaDataGridViewColumn.DataSource = this._RSMVrstaObveznikaList;
			}
		}
		
		private bool _allowNewItemInRSMVrstaObveznikaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Sifarnik
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInRSMVrstaObveznikaList
		{
			get { return _allowNewItemInRSMVrstaObveznikaList;}
			set
			{
				this._allowNewItemInRSMVrstaObveznikaList = value;
				this.uxRSMVrstaObveznikaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.Obracun> _ObracunList;
				
		/// <summary> 
		/// The list of Obracun to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.Obracun> ObracunList
		{
			get {return this._ObracunList;}
			set
			{
				this._ObracunList = value;
				this.uxObracunBindingSource.DataSource = null;
				this.uxObracunBindingSource.DataSource = value;
				this.uxObracunDataGridView.DataSource = null;
				this.uxObracunDataGridView.DataSource = this.uxObracunBindingSource;				
				//this.uxObracunBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxObracunBindingSource_ListChanged);
				this.uxObracunBindingSource.CurrentItemChanged += new System.EventHandler(OnObracunBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnObracunBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentObracun = uxObracunBindingSource.Current as Entities.Obracun;
			
			if (_currentObracun != null)
			{
				_currentObracun.Validate();
			}
			//_Obracun.Validate();
			OnCurrentEntityChanged();
		}

		//void uxObracunBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.Obracun"/> instance.
		/// </summary>
		public Entities.Obracun SelectedObracun
		{
			get {return this._currentObracun;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxObracunDataGridView.VirtualMode;}
			set
			{
				this.uxObracunDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxObracunDataGridView.AllowUserToAddRows;}
			set {this.uxObracunDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxObracunDataGridView.AllowUserToDeleteRows;}
			set {this.uxObracunDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxObracunDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxObracunDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="ObracunDataGridViewBase"/> class.
		/// </summary>
		public ObracunDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxObracunDataGridView = new System.Windows.Forms.DataGridView();
			this.uxObracunBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxObracunErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumOdDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumDoDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxVrstaUplateRSMDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxRedniBrojUGodiniDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMinimalniOsobniOdbitakDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxFondSatiDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIdentifikatorIDObrascaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxBrutoOsnovicaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxStatusDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDoprinosZdravstvenoDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDoprinosZaposljavanjeDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDoprinosNezgodaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxRSMVrstaObveznikaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxDatumIsplateDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMIO1aPostotakDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMIO1bPostotakDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMIO2PostotakDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNajvisaMjOsnovicaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIdentifikatorIDObrascaBindingSource = new SifarnikBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIdentifikatorIDObrascaBindingSource)).BeginInit();
			//this.uxVrstaUplateRSMBindingSource = new SifarnikBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxVrstaUplateRSMBindingSource)).BeginInit();
			//this.uxRSMVrstaObveznikaBindingSource = new SifarnikBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxRSMVrstaObveznikaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxObracunErrorProvider
			// 
			this.uxObracunErrorProvider.ContainerControl = this;
			this.uxObracunErrorProvider.DataSource = this.uxObracunBindingSource;						
			// 
			// uxObracunDataGridView
			// 
			this.uxObracunDataGridView.AutoGenerateColumns = false;
			this.uxObracunDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxObracunDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxDatumOdDataGridViewColumn,
		this.uxDatumDoDataGridViewColumn,
		this.uxVrstaUplateRSMDataGridViewColumn,
		this.uxRedniBrojUGodiniDataGridViewColumn,
		this.uxMinimalniOsobniOdbitakDataGridViewColumn,
		this.uxFondSatiDataGridViewColumn,
		this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn,
		this.uxIdentifikatorIDObrascaDataGridViewColumn,
		this.uxBrutoOsnovicaDataGridViewColumn,
		this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn,
		this.uxStatusDataGridViewColumn,
		this.uxDoprinosZdravstvenoDataGridViewColumn,
		this.uxDoprinosZaposljavanjeDataGridViewColumn,
		this.uxDoprinosNezgodaDataGridViewColumn,
		this.uxRSMVrstaObveznikaDataGridViewColumn,
		this.uxDatumIsplateDataGridViewColumn,
		this.uxMIO1aPostotakDataGridViewColumn,
		this.uxMIO1bPostotakDataGridViewColumn,
		this.uxMIO2PostotakDataGridViewColumn,
		this.uxNajvisaMjOsnovicaDataGridViewColumn,
		this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn,
		this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn			});
			this.uxObracunDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxObracunDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxObracunDataGridView.Name = "uxObracunDataGridView";
			this.uxObracunDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxObracunDataGridView.TabIndex = 0;	
			this.uxObracunDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxObracunDataGridView.EnableHeadersVisualStyles = false;
			this.uxObracunDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnObracunDataGridViewDataError);
			this.uxObracunDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnObracunDataGridViewCellValueNeeded);
			this.uxObracunDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnObracunDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxDatumOdDataGridViewColumn
			//
			this.uxDatumOdDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumOdDataGridViewColumn.DataPropertyName = "DatumOd";
			this.uxDatumOdDataGridViewColumn.HeaderText = "DatumOd";
			this.uxDatumOdDataGridViewColumn.Name = "uxDatumOdDataGridViewColumn";
			this.uxDatumOdDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumOdDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumOdDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumDoDataGridViewColumn
			//
			this.uxDatumDoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumDoDataGridViewColumn.DataPropertyName = "DatumDo";
			this.uxDatumDoDataGridViewColumn.HeaderText = "DatumDo";
			this.uxDatumDoDataGridViewColumn.Name = "uxDatumDoDataGridViewColumn";
			this.uxDatumDoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumDoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumDoDataGridViewColumn.ReadOnly = false;		
			//
			// uxVrstaUplateRSMDataGridViewColumn
			//
			this.uxVrstaUplateRSMDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxVrstaUplateRSMDataGridViewColumn.DataPropertyName = "VrstaUplateRSM";
			this.uxVrstaUplateRSMDataGridViewColumn.HeaderText = "VrstaUplateRSM";
			this.uxVrstaUplateRSMDataGridViewColumn.Name = "uxVrstaUplateRSMDataGridViewColumn";
			this.uxVrstaUplateRSMDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxVrstaUplateRSMDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxVrstaUplateRSMDataGridViewColumn.ReadOnly = false;		
			//
			// uxRedniBrojUGodiniDataGridViewColumn
			//
			this.uxRedniBrojUGodiniDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxRedniBrojUGodiniDataGridViewColumn.DataPropertyName = "RedniBrojUGodini";
			this.uxRedniBrojUGodiniDataGridViewColumn.HeaderText = "RedniBrojUGodini";
			this.uxRedniBrojUGodiniDataGridViewColumn.Name = "uxRedniBrojUGodiniDataGridViewColumn";
			this.uxRedniBrojUGodiniDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxRedniBrojUGodiniDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxRedniBrojUGodiniDataGridViewColumn.ReadOnly = false;		
			//
			// uxMinimalniOsobniOdbitakDataGridViewColumn
			//
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.DataPropertyName = "MinimalniOsobniOdbitak";
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.HeaderText = "MinimalniOsobniOdbitak";
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.Name = "uxMinimalniOsobniOdbitakDataGridViewColumn";
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMinimalniOsobniOdbitakDataGridViewColumn.ReadOnly = false;		
			//
			// uxFondSatiDataGridViewColumn
			//
			this.uxFondSatiDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxFondSatiDataGridViewColumn.DataPropertyName = "FondSati";
			this.uxFondSatiDataGridViewColumn.HeaderText = "FondSati";
			this.uxFondSatiDataGridViewColumn.Name = "uxFondSatiDataGridViewColumn";
			this.uxFondSatiDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxFondSatiDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxFondSatiDataGridViewColumn.ReadOnly = false;		
			//
			// uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn
			//
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.DataPropertyName = "MaksimalniIznosPorezneOlaksice";
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.HeaderText = "MaksimalniIznosPorezneOlaksice";
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.Name = "uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn";
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn.ReadOnly = false;		
			//
			// uxIdentifikatorIDObrascaDataGridViewColumn
			//
			this.uxIdentifikatorIDObrascaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIdentifikatorIDObrascaDataGridViewColumn.DataPropertyName = "IdentifikatorIDObrasca";
			this.uxIdentifikatorIDObrascaDataGridViewColumn.HeaderText = "IdentifikatorIDObrasca";
			this.uxIdentifikatorIDObrascaDataGridViewColumn.Name = "uxIdentifikatorIDObrascaDataGridViewColumn";
			this.uxIdentifikatorIDObrascaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIdentifikatorIDObrascaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIdentifikatorIDObrascaDataGridViewColumn.ReadOnly = false;		
			//
			// uxBrutoOsnovicaDataGridViewColumn
			//
			this.uxBrutoOsnovicaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxBrutoOsnovicaDataGridViewColumn.DataPropertyName = "BrutoOsnovica";
			this.uxBrutoOsnovicaDataGridViewColumn.HeaderText = "BrutoOsnovica";
			this.uxBrutoOsnovicaDataGridViewColumn.Name = "uxBrutoOsnovicaDataGridViewColumn";
			this.uxBrutoOsnovicaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxBrutoOsnovicaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxBrutoOsnovicaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn
			//
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.DataPropertyName = "DoprinosPoDanuBoravkaUInozemstvu";
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.HeaderText = "DoprinosPoDanuBoravkaUInozemstvu";
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.Name = "uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn";
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn.ReadOnly = false;		
			//
			// uxStatusDataGridViewColumn
			//
			this.uxStatusDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxStatusDataGridViewColumn.DataPropertyName = "Status";
			this.uxStatusDataGridViewColumn.HeaderText = "Status";
			this.uxStatusDataGridViewColumn.Name = "uxStatusDataGridViewColumn";
			this.uxStatusDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxStatusDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxStatusDataGridViewColumn.ReadOnly = false;		
			//
			// uxDoprinosZdravstvenoDataGridViewColumn
			//
			this.uxDoprinosZdravstvenoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDoprinosZdravstvenoDataGridViewColumn.DataPropertyName = "DoprinosZdravstveno";
			this.uxDoprinosZdravstvenoDataGridViewColumn.HeaderText = "DoprinosZdravstveno";
			this.uxDoprinosZdravstvenoDataGridViewColumn.Name = "uxDoprinosZdravstvenoDataGridViewColumn";
			this.uxDoprinosZdravstvenoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDoprinosZdravstvenoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDoprinosZdravstvenoDataGridViewColumn.ReadOnly = false;		
			//
			// uxDoprinosZaposljavanjeDataGridViewColumn
			//
			this.uxDoprinosZaposljavanjeDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDoprinosZaposljavanjeDataGridViewColumn.DataPropertyName = "DoprinosZaposljavanje";
			this.uxDoprinosZaposljavanjeDataGridViewColumn.HeaderText = "DoprinosZaposljavanje";
			this.uxDoprinosZaposljavanjeDataGridViewColumn.Name = "uxDoprinosZaposljavanjeDataGridViewColumn";
			this.uxDoprinosZaposljavanjeDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDoprinosZaposljavanjeDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDoprinosZaposljavanjeDataGridViewColumn.ReadOnly = false;		
			//
			// uxDoprinosNezgodaDataGridViewColumn
			//
			this.uxDoprinosNezgodaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDoprinosNezgodaDataGridViewColumn.DataPropertyName = "DoprinosNezgoda";
			this.uxDoprinosNezgodaDataGridViewColumn.HeaderText = "DoprinosNezgoda";
			this.uxDoprinosNezgodaDataGridViewColumn.Name = "uxDoprinosNezgodaDataGridViewColumn";
			this.uxDoprinosNezgodaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDoprinosNezgodaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDoprinosNezgodaDataGridViewColumn.ReadOnly = false;		
			//
			// uxRSMVrstaObveznikaDataGridViewColumn
			//
			this.uxRSMVrstaObveznikaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxRSMVrstaObveznikaDataGridViewColumn.DataPropertyName = "RSMVrstaObveznika";
			this.uxRSMVrstaObveznikaDataGridViewColumn.HeaderText = "RSMVrstaObveznika";
			this.uxRSMVrstaObveznikaDataGridViewColumn.Name = "uxRSMVrstaObveznikaDataGridViewColumn";
			this.uxRSMVrstaObveznikaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxRSMVrstaObveznikaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxRSMVrstaObveznikaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumIsplateDataGridViewColumn
			//
			this.uxDatumIsplateDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumIsplateDataGridViewColumn.DataPropertyName = "DatumIsplate";
			this.uxDatumIsplateDataGridViewColumn.HeaderText = "DatumIsplate";
			this.uxDatumIsplateDataGridViewColumn.Name = "uxDatumIsplateDataGridViewColumn";
			this.uxDatumIsplateDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumIsplateDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumIsplateDataGridViewColumn.ReadOnly = false;		
			//
			// uxMIO1aPostotakDataGridViewColumn
			//
			this.uxMIO1aPostotakDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMIO1aPostotakDataGridViewColumn.DataPropertyName = "MIO1aPostotak";
			this.uxMIO1aPostotakDataGridViewColumn.HeaderText = "MIO1aPostotak";
			this.uxMIO1aPostotakDataGridViewColumn.Name = "uxMIO1aPostotakDataGridViewColumn";
			this.uxMIO1aPostotakDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMIO1aPostotakDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMIO1aPostotakDataGridViewColumn.ReadOnly = false;		
			//
			// uxMIO1bPostotakDataGridViewColumn
			//
			this.uxMIO1bPostotakDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMIO1bPostotakDataGridViewColumn.DataPropertyName = "MIO1bPostotak";
			this.uxMIO1bPostotakDataGridViewColumn.HeaderText = "MIO1bPostotak";
			this.uxMIO1bPostotakDataGridViewColumn.Name = "uxMIO1bPostotakDataGridViewColumn";
			this.uxMIO1bPostotakDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMIO1bPostotakDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMIO1bPostotakDataGridViewColumn.ReadOnly = false;		
			//
			// uxMIO2PostotakDataGridViewColumn
			//
			this.uxMIO2PostotakDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMIO2PostotakDataGridViewColumn.DataPropertyName = "MIO2Postotak";
			this.uxMIO2PostotakDataGridViewColumn.HeaderText = "MIO2Postotak";
			this.uxMIO2PostotakDataGridViewColumn.Name = "uxMIO2PostotakDataGridViewColumn";
			this.uxMIO2PostotakDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMIO2PostotakDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMIO2PostotakDataGridViewColumn.ReadOnly = false;		
			//
			// uxNajvisaMjOsnovicaDataGridViewColumn
			//
			this.uxNajvisaMjOsnovicaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNajvisaMjOsnovicaDataGridViewColumn.DataPropertyName = "NajvisaMjOsnovica";
			this.uxNajvisaMjOsnovicaDataGridViewColumn.HeaderText = "NajvisaMjOsnovica";
			this.uxNajvisaMjOsnovicaDataGridViewColumn.Name = "uxNajvisaMjOsnovicaDataGridViewColumn";
			this.uxNajvisaMjOsnovicaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNajvisaMjOsnovicaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNajvisaMjOsnovicaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn
			//
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.DataPropertyName = "DoprinosZaposljavanjeSInvaliditetom";
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.HeaderText = "DoprinosZaposljavanjeSInvaliditetom";
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.Name = "uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn";
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn.ReadOnly = false;		
			//
			// uxIznosZdravstvenogZaInozemstvoDataGridViewColumn
			//
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.DataPropertyName = "IznosZdravstvenogZaInozemstvo";
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.HeaderText = "IznosZdravstvenogZaInozemstvo";
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.Name = "uxIznosZdravstvenogZaInozemstvoDataGridViewColumn";
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIznosZdravstvenogZaInozemstvoDataGridViewColumn.ReadOnly = false;		
			//
			// uxIdentifikatorIDObrascaDataGridViewColumn
			//				
			this.uxIdentifikatorIDObrascaDataGridViewColumn.DisplayMember = "IDSifarnikTip";	
			this.uxIdentifikatorIDObrascaDataGridViewColumn.ValueMember = "ID";	
			this.uxIdentifikatorIDObrascaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIdentifikatorIDObrascaDataGridViewColumn.DataSource = uxIdentifikatorIDObrascaBindingSource;				
				
			//
			// uxVrstaUplateRSMDataGridViewColumn
			//				
			this.uxVrstaUplateRSMDataGridViewColumn.DisplayMember = "IDSifarnikTip";	
			this.uxVrstaUplateRSMDataGridViewColumn.ValueMember = "ID";	
			this.uxVrstaUplateRSMDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxVrstaUplateRSMDataGridViewColumn.DataSource = uxVrstaUplateRSMBindingSource;				
				
			//
			// uxRSMVrstaObveznikaDataGridViewColumn
			//				
			this.uxRSMVrstaObveznikaDataGridViewColumn.DisplayMember = "IDSifarnikTip";	
			this.uxRSMVrstaObveznikaDataGridViewColumn.ValueMember = "ID";	
			this.uxRSMVrstaObveznikaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxRSMVrstaObveznikaDataGridViewColumn.DataSource = uxRSMVrstaObveznikaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxObracunDataGridView);
			this.Name = "ObracunDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIdentifikatorIDObrascaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxVrstaUplateRSMBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxRSMVrstaObveznikaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxObracunBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				ObracunDataGridViewEventArgs args = new ObracunDataGridViewEventArgs();
				args.Obracun = _currentObracun;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class ObracunDataGridViewEventArgs : System.EventArgs
		{
			private Entities.Obracun	_Obracun;
	
			/// <summary>
			/// the  Entities.Obracun instance.
			/// </summary>
			public Entities.Obracun Obracun
			{
				get { return _Obracun; }
				set { _Obracun = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxObracunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnObracunDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxObracunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnObracunDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxObracunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].ID;
						break;
					case "uxDatumOdDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DatumOd;
						break;
					case "uxDatumDoDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DatumDo;
						break;
					case "uxVrstaUplateRSMDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].VrstaUplateRSM;
						break;
					case "uxRedniBrojUGodiniDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].RedniBrojUGodini;
						break;
					case "uxMinimalniOsobniOdbitakDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].MinimalniOsobniOdbitak;
						break;
					case "uxFondSatiDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].FondSati;
						break;
					case "uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].MaksimalniIznosPorezneOlaksice;
						break;
					case "uxIdentifikatorIDObrascaDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].IdentifikatorIDObrasca;
						break;
					case "uxBrutoOsnovicaDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].BrutoOsnovica;
						break;
					case "uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DoprinosPoDanuBoravkaUInozemstvu;
						break;
					case "uxStatusDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].Status;
						break;
					case "uxDoprinosZdravstvenoDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DoprinosZdravstveno;
						break;
					case "uxDoprinosZaposljavanjeDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DoprinosZaposljavanje;
						break;
					case "uxDoprinosNezgodaDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DoprinosNezgoda;
						break;
					case "uxRSMVrstaObveznikaDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].RSMVrstaObveznika;
						break;
					case "uxDatumIsplateDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DatumIsplate;
						break;
					case "uxMIO1aPostotakDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].MIO1aPostotak;
						break;
					case "uxMIO1bPostotakDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].MIO1bPostotak;
						break;
					case "uxMIO2PostotakDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].MIO2Postotak;
						break;
					case "uxNajvisaMjOsnovicaDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].NajvisaMjOsnovica;
						break;
					case "uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].DoprinosZaposljavanjeSInvaliditetom;
						break;
					case "uxIznosZdravstvenogZaInozemstvoDataGridViewColumn":
						e.Value = ObracunList[e.RowIndex].IznosZdravstvenogZaInozemstvo;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxObracunDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnObracunDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxObracunDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						ObracunList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxDatumOdDataGridViewColumn":
						ObracunList[e.RowIndex].DatumOd = (System.DateTime)e.Value;
						break;
					case "uxDatumDoDataGridViewColumn":
						ObracunList[e.RowIndex].DatumDo = (System.DateTime)e.Value;
						break;
					case "uxVrstaUplateRSMDataGridViewColumn":
						ObracunList[e.RowIndex].VrstaUplateRSM = (System.Int32)e.Value;
						break;
					case "uxRedniBrojUGodiniDataGridViewColumn":
						ObracunList[e.RowIndex].RedniBrojUGodini = (System.Int32)e.Value;
						break;
					case "uxMinimalniOsobniOdbitakDataGridViewColumn":
						ObracunList[e.RowIndex].MinimalniOsobniOdbitak = (System.Decimal)e.Value;
						break;
					case "uxFondSatiDataGridViewColumn":
						ObracunList[e.RowIndex].FondSati = (System.Single)e.Value;
						break;
					case "uxMaksimalniIznosPorezneOlaksiceDataGridViewColumn":
						ObracunList[e.RowIndex].MaksimalniIznosPorezneOlaksice = (System.Decimal)e.Value;
						break;
					case "uxIdentifikatorIDObrascaDataGridViewColumn":
						ObracunList[e.RowIndex].IdentifikatorIDObrasca = (System.Int32)e.Value;
						break;
					case "uxBrutoOsnovicaDataGridViewColumn":
						ObracunList[e.RowIndex].BrutoOsnovica = (System.Decimal)e.Value;
						break;
					case "uxDoprinosPoDanuBoravkaUInozemstvuDataGridViewColumn":
						ObracunList[e.RowIndex].DoprinosPoDanuBoravkaUInozemstvu = (System.Decimal?)e.Value;
						break;
					case "uxStatusDataGridViewColumn":
						ObracunList[e.RowIndex].Status = (System.Int32)e.Value;
						break;
					case "uxDoprinosZdravstvenoDataGridViewColumn":
						ObracunList[e.RowIndex].DoprinosZdravstveno = (System.Decimal)e.Value;
						break;
					case "uxDoprinosZaposljavanjeDataGridViewColumn":
						ObracunList[e.RowIndex].DoprinosZaposljavanje = (System.Decimal)e.Value;
						break;
					case "uxDoprinosNezgodaDataGridViewColumn":
						ObracunList[e.RowIndex].DoprinosNezgoda = (System.Decimal)e.Value;
						break;
					case "uxRSMVrstaObveznikaDataGridViewColumn":
						ObracunList[e.RowIndex].RSMVrstaObveznika = (System.Int32)e.Value;
						break;
					case "uxDatumIsplateDataGridViewColumn":
						ObracunList[e.RowIndex].DatumIsplate = (System.DateTime)e.Value;
						break;
					case "uxMIO1aPostotakDataGridViewColumn":
						ObracunList[e.RowIndex].MIO1aPostotak = (System.Single?)e.Value;
						break;
					case "uxMIO1bPostotakDataGridViewColumn":
						ObracunList[e.RowIndex].MIO1bPostotak = (System.Single?)e.Value;
						break;
					case "uxMIO2PostotakDataGridViewColumn":
						ObracunList[e.RowIndex].MIO2Postotak = (System.Single?)e.Value;
						break;
					case "uxNajvisaMjOsnovicaDataGridViewColumn":
						ObracunList[e.RowIndex].NajvisaMjOsnovica = (System.Decimal?)e.Value;
						break;
					case "uxDoprinosZaposljavanjeSInvaliditetomDataGridViewColumn":
						ObracunList[e.RowIndex].DoprinosZaposljavanjeSInvaliditetom = (System.Decimal?)e.Value;
						break;
					case "uxIznosZdravstvenogZaInozemstvoDataGridViewColumn":
						ObracunList[e.RowIndex].IznosZdravstvenogZaInozemstvo = (System.Decimal?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
